<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML>
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title><%=request.getAttribute("title")%></title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link href="css/ichart.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="js/ichart/ichart-1.0.min.js"></script>
	<script type="text/javascript">
		 $(function(){	
			var chart = new iChart.Column2D({
				render : 'canvasDiv',//渲染的Dom目标,canvasDiv为Dom的ID
				data: <%=request.getAttribute("data")%>,//绑定数据
				title : '<%=request.getAttribute("title")%>',//设置标题
				width : 900,//设置宽度，默认单位为px
				height : 400,//设置高度，默认单位为px
				shadow : true,//激活阴影
				shadow_color : '#c7c7c7',//设置阴影颜色
				coordinate : {//配置自定义坐标轴
					scale : [{//配置自定义值轴
						position : 'left',//配置左值轴	
						start_scale : 0,//设置开始刻度为0
						end_scale : 100,//设置结束刻度为100
						scale_space : 10,//设置刻度间距
						listeners : {//配置事件
							parseText:function(t, x, y){//设置解析值轴文本
								return {text : t};
							}
						}
					}]
				}
			});
			//调用绘图方法开始绘图
			chart.draw();
		});
	</script>
  </head>
  
  <body>
  	<div id='canvasDiv' class="page"></div>
  </body>
</html>
